import java.awt.image.BufferedImage;


public class Animation {
	private BufferedImage[] states;
	private String name;
	int width;
	public Animation(String file, int width, String name){
		BufferedImage main;
		this.name = name;
		main = Utilities.getImage(file);
		states = new BufferedImage[main.getWidth() / width];
		for(int i = 0; i < states.length; i++){
			states[i] = main.getSubimage(i * width, 0, width, width);
		}
		this.width = width;
	}
	public BufferedImage currentAniState(int i){
		return states[i];
	}
	public BufferedImage background(){
		return states[0];
	}
	public String getName(){
		return name;
	}
}
